<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>demo1</title>
<script type="text/javascript" src="../js/ball.js"></script>
<script type="text/javascript">
	var ballX=30;
	var ballY=30;
	var cxt;
	window.onload = function(){
		//得到画布
		var canvas1 = document.getElementById("demo1_c1");
		//得到绘图上下文(你可以理解是画笔)
		cxt = canvas1.getContext("2d");
		drawBall();
	}
</script>
</head>
<!--当按键后，去调用 test();-->
<body onkeydown="move(event)">
<canvas id="demo1_c1" width="400px" height="300px" ></canvas>
</body>
</html>